#ifndef CONTROLITEM_H
#define CONTROLITEM_H

#include <QList>
#include <QVariant>
class rpi_control;
class ControlItem

{
public:
    ControlItem(const QList<QVariant> &data, ControlItem *parent = 0);
    ControlItem(rpi_control *data, ControlItem *parent = 0);
    ~ControlItem();

    void appendChild(ControlItem *child);

    ControlItem *child(int row);
    int childCount() const;
    int columnCount() const;
    QVariant data(int column) const;
    int row() const;
    ControlItem *parent();

private:
    QList<ControlItem*> childItems;
    QList<QVariant> itemData;
    ControlItem *parentItem;
};

#endif
